<div bd-module="modules/tabs/tabs.js" bd-role="tabs" bd-state="events:click" class="vm-wrap vm-audit" bd-on="changed:groupChange">
    <div class="side-tabs">
        <div class="side-tabs-inner">
            <div class="src-tab" bd-role="tab-nav" bd-repeat="group in pointGroups" bd-text="group.slabel"></div>
        </div>
    </div>
    <div bd-role="tab-body" class="vm-table-wrap" bd-repeat="group in pointGroups">
        <table class="vm-table">
            <thead>
                <tr class="vm-table-header">
                    <th>点位示例</th>
                    <th>拍摄要求</th>
                    <th width=40><input bd-click="checkAll()" bd-checked="{{checks.length==currentGroup.list.length}}" type="checkbox" /></th>
                    <th>审核点位图</th>
                    <th>审核状态
                        <div bd-show="checks.length">
                            <input type="button" bd-click="batchAudit(1)" value="批量通过" />
                            <div class="vm-audit-wrap">
                                <input type="button" bd-click="topState.showBatchReason=!topState.showBatchReason" value="批量不通过" />
                                <div style="display:none" bd-show="topState.showBatchReason" class="vm-reasonlist">
                                    <input bd-repeat="reason in reasonList" type="button" bd-value="reason" bd-click="batchAudit(0,reason)" />
                                </div>
                            </div>
                        </div>
                    </th>
                </tr>
            </thead>
            <tbody>
                <script type="text/template" bd-repeat="point in group.list">
                    <tr data-point="<%=point.id%>">
                        <td align="center">
                            <img src="<%=point.refurl%>" class="vm-point-thumb" bd-popimg="audit_<%=group.name%>" href="<%=point.refurl%>" title="<%=point.label%>(<%=point.id%>)" /><br>
                            <%=point.label%>(<%=point.id%>) <%=point.weight%>
                        </td>
                        <td><%=point.desc%></td>
                        <td align="center"><%if(point.photo){%><input value="<%=point.id%>" bd-model="checks*" type="checkbox" /><%}%></td>
                        <td align="center">
                            <div class="vm-point-photowrap">
                                <%if(point.photo){%>
                                <img src="<%=point.photo.path%>" class="vm-point-thumb" bd-popimg="auditusr_<%=group.name%>" href="<%=point.photo.path%>" title="<%=point.label%>(<%=point.id%>)" />
                                <%}%>
                            </div>
                        </td>
                        <td align="center">
                            <%if(point.photo){%>
                            <div style="margin-top:-30px">
                            <%if(point.photo.audit!==1){%><input type="button" bd-click="audit(point,1)" value="通过" /><%}else{%><span style="font-weight:bold;color:green">已通过<span><%}%> &nbsp;
                            <div class="vm-audit-wrap">
                                <%if(point.photo.audit!==0||!point.photo.reason){%><input type="button" bd-click="point.photo.audit=0" value="不通过" /><%}else{%><span class="vm-reason"><%=point.photo.reason%></span><%}%>
                                <div style="display:none" bd-show="{{point.photo.audit===0&&!point.photo.reason}}" class="vm-reasonlist">
                                    <input bd-repeat="reason in reasonList" type="button" bd-value="reason" bd-click="audit(point,0,reason)" />
                                </div>
                            </div>
                            </div>
                            <%}%>
                        </td>
                    </tr>
                </script>
            </tbody>
        </table>
    </div>
</div>
